home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / admin / dig-2.0 / dig-2 / dig.2.0 / sethostent.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-09-04  |  847 b   |  46 lines

  1.  
  2. /*
  3.  * Copyright (c) 1985 Regents of the University of California.
  4.  * All rights reserved.  The Berkeley software License Agreement
  5.  * specifies the terms and conditions for redistribution.
  6.  */
  7.  
  8. /*
  9. ** Distributed with 'dig' version 2.0 from University of Southern
  10. ** California Information Sciences Institute (USC-ISI). 9/1/90
  11. */
  12.  
  13. #if defined(LIBC_SCCS) && !defined(lint)
  14. static char sccsid[] = "@(#)sethostent.c    6.3 (Berkeley) 4/10/86";
  15. #endif LIBC_SCCS and not lint
  16.  
  17. #include "hfiles.h"
  18.  
  19. #include <sys/types.h>
  20. #include NAMESERH
  21. #ifndef T_TXT
  22. #define T_TXT 16
  23. #endif T_TXT
  24. #include <netinet/in.h>
  25. #include RESOLVH
  26.  
  27. sethostent(stayopen)
  28. {
  29.     if (stayopen)
  30.         _res.options |= RES_STAYOPEN | RES_USEVC;
  31. }
  32.  
  33. endhostent()
  34. {
  35.     _res.options &= ~(RES_STAYOPEN | RES_USEVC);
  36.     _res_close();
  37. }
  38.  
  39. sethostfile(name)
  40. char *name;
  41. {
  42. #ifdef lint
  43. name = name;
  44. #endif
  45. }
  46.